<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
     <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
    <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<style type="text/css">

#div2{
	background-image: url(../static/img/img1.png); 
	padding: 20px; 
	border: solid; 
	border-width:1px; 
	border-color: black; 
}

input.submit{
	color: white;
	font-size: small;
}

#table-datos {
	border-width: thin;
	border-spacing: 0px;
	border-style: solid;
	border-color: gray;
	border-collapse: collapse;
	text-align: center;
}


#table-datos th {
	font-weight:bold;
	border-width: thin;
	padding: 2px;
	text-align: center;
	border-style: solid;
	border-color: gray;
}

#table-datos td {
	border-width: thin;
	padding: 2px;
	text-align: center;
	border-style: solid;
	border-color: gray;
}

</style>

</head>
<body>
<div id="div2">


<br>
			<c:set var="filas" value="${datosValidados.filas}" scope="page" />
			<c:set var="titulos" value="${datosValidados.titulos}" scope="page" />
			<table>
				<tr>
					<td>
					<table align="left" id="table" width="100%" id="table-datos">
						<thead title="titulos">
							<tr align="center">
								<c:forEach items="${titulos}" var="titulo">
									<th width="80px">${titulo}</th>
								</c:forEach>	
									<th width="80px">Error?</th>
							</tr>
						</thead>
						<tbody>
							<c:forEach items="${filas}" var="fila">
								<tr>
								<c:forEach items="${fila.valores}" var="valor">
									<td align="center"> ${valor != null && valor != '' ? valor : '-'}</td>
								</c:forEach>
									<td>${fila.error}</td>
								</tr>
							</c:forEach>
								
						</tbody>

					</table>
					</td>
				</tr>
				<form:form action="insertarDatos.do" method="post">
				<input type="hidden" name="entity" value="${entity}"/>
				<tr>
					<td><input type="submit" value="Importar" class="submit"></td>
				</tr>
				</form:form>					
			</table>
	<br></br>
	<hr></hr>
	<br></br>
	
</div><!-- #div2-->
</body>
</html>